package com.cragon.listener;

import java.util.EventObject;

/**
 * @Description: 事件对象
 * @Author: ZHOUHAILONG
 * @Date: 2020年07月31日 10:31
 */
public class ClickEvent extends EventObject {
	private int id;
	public final static int SINGLE_CLICK = 1; // 单击事件
	public final static int DOUBLE_CLICK = 2; // 双击事件

	public ClickEvent(Object source) {
		super(source);
	}

	public ClickEvent(Object source, int id) {
		super(source);
		switch (id) {
			case SINGLE_CLICK:
				this.id = SINGLE_CLICK;
				break;
			case DOUBLE_CLICK:
				this.id = DOUBLE_CLICK;
				break;
		}
	}

	public int getId() {
		return this.id;
	}
}
